home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1984 Half 1 / rerun-1984-01-06-side-b.d64 / kingdom feb p76 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  3KB  |  122 lines

  1. 10 rem rule the kingdom by j. shaughnessy
  2. 12 poke53281,1:print"[144]";chr$(14)
  3. 14 p=100:ar=10:sp=0:rd=150:yh=3:gh=3000:ca=1000:yr=1:gs=2850
  4. 16 goto114
  5. 18 rem subroutines
  6. 20 print"[147]          [211][212][193][212][197][160][207][198][160][212][200][197][160][210][197][193][204][205]  [146]":print
  7. 22 printspc(13);" [208]eople:";p
  8. 24 printspc(13);" [193]cres :";ca
  9. 26 printspc(13);" [194]u. [211]tored:";gs
  10. 28 printspc(13);" [203]ingdom is at ";pw$
  11. 30 print:print"                                       [146]":print:return
  12. 32 i=val(i$):i=int(abs(i)):return
  13. 34 rem delay loop
  14. 36 forx=1to4000:next:return
  15. 38 rem wait for key
  16. 40 printspc(11);"[200]it a key to proceed"
  17. 42 geta$:ifa$=""then42
  18. 44 return
  19. 46 print"[147]* [200]ail [199]reat [210]uler ! *[146]"
  20. 48 print"[201] beg to report that in the year";yr;"[146]of"
  21. 50 print"your reign:"
  22. 52 if sp=1then58
  23. 54 ifsp=0thenprint" [206]obody starved, and":goto60
  24. 56 print sp;"people starved,and";
  25. 57 goto60
  26. 58 print"[207]ne person starved,and ";
  27. 60 ifwk<1then68
  28. 62 ifwk=1thenprint"[207]ne ";:goto66
  29. 64 printwk;
  30. 66 print"died in battle"
  31. 68 ifar=1then72
  32. 70 print ar;"people came to the kingdom":goto76
  33. 72 ifsp<10andsp>1andwk<1thenprint" ";
  34. 74 print" one person came to the kingdom."
  35. 76 print"[215]e harvested";gh;
  36. 78 print"bushels at";yh;"bushels"
  37. 80 print"per acre."
  38. 82 print"[210]ats ruined";rd;"bu.";
  39. 84 print"leaving";gs
  40. 86 print"bushels in storage."
  41. 88 print"[212]he kingdom has";ca;
  42. 90 print"acres of land."
  43. 92 return
  44. 94 print"[207][200] [203]ing...think again!":gosub36:return
  45. 96 print"[212]he starving peasants raided the warehouses"
  46. 98 print"and destroyed 50% of  the stored grain"
  47. 100 gs=int(gs/2):wr=0:gosub36:return
  48. 102 ifj>0thenreturn
  49. 104 p=p-int(p/2):print"[212]he plague killed half of the people."
  50. 106 print"[212]he population is now ";p;".":gosub36:return
  51. 108 ifsp<pthenreturn
  52. 110 print"[147][193]ll of your subjects  are [196]ead......        [211]o are you!"
  53. 112 goto236
  54. 114 print:print"[147]            [210][213][204][197] [212][200][197] [203][201][206][199][196][207][205]   [146]"
  55. 116 print"[215]here you govern the ancient [203]ingdom of [194]abylon"
  56. 118 print"[212]he object is to keep the [203]ingdom       growing"
  57. 120 print"[201]f you want to quit, sell all of your   land."
  58. 122 gosub38
  59. 124 zz=rnd(ti):goto128
  60. 126 zz=rnd(1):ifzz<.3thenpw$="[215][193][210]":wf=1.5:goto130
  61. 128 wf=1:pw$="[208][197][193][195][197]"
  62. 130 gosub46:gosub38:gosub20
  63. 132 k=int(rnd(1)*12+16):print"[204]and is worth";k;
  64. 134 print"bushels per acre."
  65. 136 print"    [194][146]uy,[211][146]ell,or [200][146]old [204]and"
  66. 138 gosub42
  67. 140 ifa$="b"ora$="s"ora$="h"then144
  68. 142 print"[157] [157][145]":goto138
  69. 144 ifa$="h"then172
  70. 146 print"[200]ow many acres"
  71. 148 input"*[157][157][157]";i$
  72. 150 ifi$="*"thenprint"[145][145]":goto148
  73. 152 gosub32:ifi=0then172
  74. 154 ifa$="s"then164
  75. 156 j=i*k:ifj<=gsthen160
  76. 158 gosub94:gosub20:goto136
  77. 160 gs=gs-j:ca=ca+i
  78. 162 gosub20:goto172
  79. 164 ifi=cathen234
  80. 166 ifi>cathengosub94:gosub20:goto146
  81. 168 ca=ca-i:gs=gs+k*i
  82. 170 gosub20
  83. 172 print:print"[196]istribute how many bushels for food"
  84. 174 input"*[157][157][157]";i$
  85. 176 ifi$="*"thenprint"[145][145][145]":goto174
  86. 178 gosub32
  87. 180 ifi<=gsthen184
  88. 182 gosub94:gosub20:goto172
  89. 184 ifi>(5*p)then190
  90. 186 ifi>gs/4then190
  91. 188 wr=1:rem warehs raid
  92. 190 gs=gs-i:sp=p-int(i/20):ar=0:gosub108:ifsp>=0then194
  93. 192 ar=-sp/2:sp=0
  94. 194 ifwr=1thengosub96
  95. 196 gosub20
  96. 198 print"  [200]ow many acres shall we plant"
  97. 200 input"*[157][157][157]";i$
  98. 202 ifi$="*"thenprint"[145][145][145]":goto200
  99. 204 gosub32
  100. 206 ifi>cathen214
  101. 208 j=int(i/2):ifj>gsthen214
  102. 210 ifi>(10*p/wf)then214
  103. 212 goto218
  104. 214 gosub94:gosub20:goto198
  105. 216 rem calc changes for year
  106. 218 gs=gs-j:yh=1+int(rnd(1)*5):gh=yh*i:rd=int((gs+gh)*.07*rnd(1)):gs=gs-rd+gh
  107. 220 j=int(rnd(1)*25):ifwf=1.5thenwk=int(.3*rnd(1)*p):goto224
  108. 222 wk=0
  109. 224 ar=int(ar+(5-yh)*gs/600+1):ifar<=99then228
  110. 226 ar=99
  111. 228 ifar<0thenar=0
  112. 230 p=p+ar-sp-wk:yr=yr+1
  113. 232 gosub102:goto126
  114. 234 print"[147][217]ou have sold all of your land,the game is over"
  115. 236 print"[217]ou can go back to being yourself."
  116. 238 ca=ca+int(gs/k):b$=" increased"
  117. 240 if ca<1130thenb$=" decreased"
  118. 242 print"[196]uring your reign,you";b$;" the wealth"
  119. 244 print"of the kingdom by factor of";int((ca/1130)*1000)/1000;"in";
  120. 246 printyr;" years."
  121. 248 end
  122.